/*=============================================================
* 	Copyright (C) 2024 USTC All rights reserved.
* 	
* 	filename : nn.h
* 	Author: Wei Jinsong
* 	Mail: vitus@mainl.ustc.edu.cn
* 	Date 2024-05-19
* 	Abstract 
* 		
*
=============================================================*/

#ifndef __NN_H__
#define __NN_H__

#include "systemc.h"
#include "noc.h"
#include "core.h"
#include "synapse.h"
#include "utils.h"

using namespace sc_core;
using namespace std;

class BaseNetwork 
    : public::sc_module
{
public:
    BaseNetwork(sc_module_name name, string file);
    
    BaseCore** cores;
    NeuronSynapse **synapses;
    BaseNoC *noc;

    sc_clock clock;
};

class FSNetwork
    :public::sc_module
{
public:
    FSNetwork(sc_module_name name, string file);

    void print_spike_sta(ostream& os);
private: 
    BaseCore** cores;
    NeuronSynapse **synapses;
    BaseNoC *noc;
    FSNeuronTimer *timer;
    sc_clock clock;
};

class DVSNetwork
    :public::sc_module
{
public:
    DVSNetwork(sc_module_name name, string file);

    void print_spike_sta(ostream& os);
private: 
    BaseCore** cores;
    NeuronSynapse **synapses;
    BaseNoC *noc;
    FSNeuronTimer *timer;
    sc_clock clock;
};
#endif

